const service = require("../service/browse-service");
const { awaitService } = require("../utils/tools");

class BroserController {
  async getCourse(ctx, next) {
    const result = service.getCourseData(ctx);
    await awaitService();
    ctx.body = result;
  }
  async getBook(ctx, next) {
    const result = service.getBookData(ctx);
    await awaitService();
    ctx.body = result;
  }
}

module.exports = new BroserController();
